package sixth.group.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class DishesExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DishesExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andDidIsNull() {
            addCriterion("did is null");
            return (Criteria) this;
        }

        public Criteria andDidIsNotNull() {
            addCriterion("did is not null");
            return (Criteria) this;
        }

        public Criteria andDidEqualTo(Integer value) {
            addCriterion("did =", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidNotEqualTo(Integer value) {
            addCriterion("did <>", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidGreaterThan(Integer value) {
            addCriterion("did >", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidGreaterThanOrEqualTo(Integer value) {
            addCriterion("did >=", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidLessThan(Integer value) {
            addCriterion("did <", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidLessThanOrEqualTo(Integer value) {
            addCriterion("did <=", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidIn(List<Integer> values) {
            addCriterion("did in", values, "did");
            return (Criteria) this;
        }

        public Criteria andDidNotIn(List<Integer> values) {
            addCriterion("did not in", values, "did");
            return (Criteria) this;
        }

        public Criteria andDidBetween(Integer value1, Integer value2) {
            addCriterion("did between", value1, value2, "did");
            return (Criteria) this;
        }

        public Criteria andDidNotBetween(Integer value1, Integer value2) {
            addCriterion("did not between", value1, value2, "did");
            return (Criteria) this;
        }

        public Criteria andDnameIsNull() {
            addCriterion("dname is null");
            return (Criteria) this;
        }

        public Criteria andDnameIsNotNull() {
            addCriterion("dname is not null");
            return (Criteria) this;
        }

        public Criteria andDnameEqualTo(String value) {
            addCriterion("dname =", value, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameNotEqualTo(String value) {
            addCriterion("dname <>", value, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameGreaterThan(String value) {
            addCriterion("dname >", value, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameGreaterThanOrEqualTo(String value) {
            addCriterion("dname >=", value, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameLessThan(String value) {
            addCriterion("dname <", value, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameLessThanOrEqualTo(String value) {
            addCriterion("dname <=", value, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameLike(String value) {
            addCriterion("dname like", value, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameNotLike(String value) {
            addCriterion("dname not like", value, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameIn(List<String> values) {
            addCriterion("dname in", values, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameNotIn(List<String> values) {
            addCriterion("dname not in", values, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameBetween(String value1, String value2) {
            addCriterion("dname between", value1, value2, "dname");
            return (Criteria) this;
        }

        public Criteria andDnameNotBetween(String value1, String value2) {
            addCriterion("dname not between", value1, value2, "dname");
            return (Criteria) this;
        }

        public Criteria andDridIsNull() {
            addCriterion("drid is null");
            return (Criteria) this;
        }

        public Criteria andDridIsNotNull() {
            addCriterion("drid is not null");
            return (Criteria) this;
        }

        public Criteria andDridEqualTo(Integer value) {
            addCriterion("drid =", value, "drid");
            return (Criteria) this;
        }

        public Criteria andDridNotEqualTo(Integer value) {
            addCriterion("drid <>", value, "drid");
            return (Criteria) this;
        }

        public Criteria andDridGreaterThan(Integer value) {
            addCriterion("drid >", value, "drid");
            return (Criteria) this;
        }

        public Criteria andDridGreaterThanOrEqualTo(Integer value) {
            addCriterion("drid >=", value, "drid");
            return (Criteria) this;
        }

        public Criteria andDridLessThan(Integer value) {
            addCriterion("drid <", value, "drid");
            return (Criteria) this;
        }

        public Criteria andDridLessThanOrEqualTo(Integer value) {
            addCriterion("drid <=", value, "drid");
            return (Criteria) this;
        }

        public Criteria andDridIn(List<Integer> values) {
            addCriterion("drid in", values, "drid");
            return (Criteria) this;
        }

        public Criteria andDridNotIn(List<Integer> values) {
            addCriterion("drid not in", values, "drid");
            return (Criteria) this;
        }

        public Criteria andDridBetween(Integer value1, Integer value2) {
            addCriterion("drid between", value1, value2, "drid");
            return (Criteria) this;
        }

        public Criteria andDridNotBetween(Integer value1, Integer value2) {
            addCriterion("drid not between", value1, value2, "drid");
            return (Criteria) this;
        }

        public Criteria andDvalueIsNull() {
            addCriterion("dvalue is null");
            return (Criteria) this;
        }

        public Criteria andDvalueIsNotNull() {
            addCriterion("dvalue is not null");
            return (Criteria) this;
        }

        public Criteria andDvalueEqualTo(Integer value) {
            addCriterion("dvalue =", value, "dvalue");
            return (Criteria) this;
        }

        public Criteria andDvalueNotEqualTo(Integer value) {
            addCriterion("dvalue <>", value, "dvalue");
            return (Criteria) this;
        }

        public Criteria andDvalueGreaterThan(Integer value) {
            addCriterion("dvalue >", value, "dvalue");
            return (Criteria) this;
        }

        public Criteria andDvalueGreaterThanOrEqualTo(Integer value) {
            addCriterion("dvalue >=", value, "dvalue");
            return (Criteria) this;
        }

        public Criteria andDvalueLessThan(Integer value) {
            addCriterion("dvalue <", value, "dvalue");
            return (Criteria) this;
        }

        public Criteria andDvalueLessThanOrEqualTo(Integer value) {
            addCriterion("dvalue <=", value, "dvalue");
            return (Criteria) this;
        }

        public Criteria andDvalueIn(List<Integer> values) {
            addCriterion("dvalue in", values, "dvalue");
            return (Criteria) this;
        }

        public Criteria andDvalueNotIn(List<Integer> values) {
            addCriterion("dvalue not in", values, "dvalue");
            return (Criteria) this;
        }

        public Criteria andDvalueBetween(Integer value1, Integer value2) {
            addCriterion("dvalue between", value1, value2, "dvalue");
            return (Criteria) this;
        }

        public Criteria andDvalueNotBetween(Integer value1, Integer value2) {
            addCriterion("dvalue not between", value1, value2, "dvalue");
            return (Criteria) this;
        }

        public Criteria andDintroductionIsNull() {
            addCriterion("dintroduction is null");
            return (Criteria) this;
        }

        public Criteria andDintroductionIsNotNull() {
            addCriterion("dintroduction is not null");
            return (Criteria) this;
        }

        public Criteria andDintroductionEqualTo(String value) {
            addCriterion("dintroduction =", value, "dintroduction");
            return (Criteria) this;
        }

        public Criteria andDintroductionNotEqualTo(String value) {
            addCriterion("dintroduction <>", value, "dintroduction");
            return (Criteria) this;
        }

        public Criteria andDintroductionGreaterThan(String value) {
            addCriterion("dintroduction >", value, "dintroduction");
            return (Criteria) this;
        }

        public Criteria andDintroductionGreaterThanOrEqualTo(String value) {
            addCriterion("dintroduction >=", value, "dintroduction");
            return (Criteria) this;
        }

        public Criteria andDintroductionLessThan(String value) {
            addCriterion("dintroduction <", value, "dintroduction");
            return (Criteria) this;
        }

        public Criteria andDintroductionLessThanOrEqualTo(String value) {
            addCriterion("dintroduction <=", value, "dintroduction");
            return (Criteria) this;
        }

        public Criteria andDintroductionLike(String value) {
            addCriterion("dintroduction like", value, "dintroduction");
            return (Criteria) this;
        }

        public Criteria andDintroductionNotLike(String value) {
            addCriterion("dintroduction not like", value, "dintroduction");
            return (Criteria) this;
        }

        public Criteria andDintroductionIn(List<String> values) {
            addCriterion("dintroduction in", values, "dintroduction");
            return (Criteria) this;
        }

        public Criteria andDintroductionNotIn(List<String> values) {
            addCriterion("dintroduction not in", values, "dintroduction");
            return (Criteria) this;
        }

        public Criteria andDintroductionBetween(String value1, String value2) {
            addCriterion("dintroduction between", value1, value2, "dintroduction");
            return (Criteria) this;
        }

        public Criteria andDintroductionNotBetween(String value1, String value2) {
            addCriterion("dintroduction not between", value1, value2, "dintroduction");
            return (Criteria) this;
        }

        public Criteria andDuptimeIsNull() {
            addCriterion("duptime is null");
            return (Criteria) this;
        }

        public Criteria andDuptimeIsNotNull() {
            addCriterion("duptime is not null");
            return (Criteria) this;
        }

        public Criteria andDuptimeEqualTo(Date value) {
            addCriterion("duptime =", value, "duptime");
            return (Criteria) this;
        }

        public Criteria andDuptimeNotEqualTo(Date value) {
            addCriterion("duptime <>", value, "duptime");
            return (Criteria) this;
        }

        public Criteria andDuptimeGreaterThan(Date value) {
            addCriterion("duptime >", value, "duptime");
            return (Criteria) this;
        }

        public Criteria andDuptimeGreaterThanOrEqualTo(Date value) {
            addCriterion("duptime >=", value, "duptime");
            return (Criteria) this;
        }

        public Criteria andDuptimeLessThan(Date value) {
            addCriterion("duptime <", value, "duptime");
            return (Criteria) this;
        }

        public Criteria andDuptimeLessThanOrEqualTo(Date value) {
            addCriterion("duptime <=", value, "duptime");
            return (Criteria) this;
        }

        public Criteria andDuptimeIn(List<Date> values) {
            addCriterion("duptime in", values, "duptime");
            return (Criteria) this;
        }

        public Criteria andDuptimeNotIn(List<Date> values) {
            addCriterion("duptime not in", values, "duptime");
            return (Criteria) this;
        }

        public Criteria andDuptimeBetween(Date value1, Date value2) {
            addCriterion("duptime between", value1, value2, "duptime");
            return (Criteria) this;
        }

        public Criteria andDuptimeNotBetween(Date value1, Date value2) {
            addCriterion("duptime not between", value1, value2, "duptime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}